﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Microsoft.Phone.Controls;

namespace restaurant.Pages
{
    public partial class Page4_Food_Details : PhoneApplicationPage
    {
        public Page4_Food_Details()
        {
            InitializeComponent();
        }
        dbFunctions dbfunc = new dbFunctions();
        private void hyperlinkButton1_Click(object sender, RoutedEventArgs e)
        {
            int temp = dbfunc.get_food_ID(FoodNameBox.Text);
            dbfunc.insert_into_foodhist(1, temp, DateTime.Parse(MealDateBox.Text), float.Parse(QuantityBox.Text), noteBox.Text, 1); 
        }

        private void PhoneApplicationPage_Loaded(object sender, RoutedEventArgs e)
        {
            dbfunc.insert_into_food(1, "noodle", 1, "pound", 20, 10, 9, 24);
            dbfunc.insert_into_food(2, "chicken", 1, "plate", 33, 28, 12, 50);
            dbfunc.insert_into_food(3, "beer", 500, "oz", 13, 09, 11, 23);
        }
    }
}